Go Standard Library Cookbook by Radomír Sohlich

Go Standard Library Cookbook by Radomír Sohlich

Author:Radomír Sohlich
Language: eng
Format: mobi, epub
Publisher: Packt
Published: 2018-02-27T11:24:50+00:00


Seeking a position within a file

In some cases, you need to read from or write to a particular location in a file, such as an indexed file. The recipe will show you how to use the position seeking in the context of flat file operations.

How to do it...

Open the console and create the folder chapter05/recipe06.

Navigate to the directory.

Create the file flatfile.txt with the following content:

123.Jun.......Wong......

12..Novak.....Jurgen....

10..Thomas....Sohlich...

Create the fileseek.go file with the following content:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.